package com.spring.boot.springBoot.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by pactera on 2017/9/27.
 */
@RestController
public class HellonController {

    @Value("${server.port}")
    private String port;

    @GetMapping("/")
    public String hellon(){
        System.out.print("8888888882222288888888888------------------"+port);
        return "Hello word";
    }

    @GetMapping("/zeroException")
    public int zeroException(){
        return 100/0;
    }

}
